package grpcclients

import (
	"github.com/goAdminMicroService/api/proto"
	"github.com/goAdminMicroService/internal/pkg/transports/grpc"
	"github.com/pkg/errors"
)

func NewDetailsClient(client *grpc.Client) (proto.DetailsClient, error) {
	conn, err := client.Dial("details")
	if err != nil {
		return nil, errors.Wrap(err, "detail client dial err")
	}
	c := proto.NewDetailsClient(conn)
	return c, nil
}
